add_executable(industrial_robot_control
    main.cpp
    core/application.cpp
    robot_controller.cpp
    ethercat/master.cpp
    modbus/modbus_client.cpp
    config_loader.cpp
    utils/realtime_utils.cpp
    utils/log.cpp
    kinematics/robot_arm.cpp
    safety/safety_monitor.cpp
    visualization/web_server.cpp
)

# 包含目录
target_include_directories(industrial_robot_control PRIVATE
    ${CMAKE_SOURCE_DIR}/include
    ${ETHERCAT_INCLUDE_DIRS}
    ${MODBUS_INCLUDE_DIRS}
    ${YAML_CPP_INCLUDE_DIRS}
    ${WEBSOCKETS_INCLUDE_DIRS}
)

# 链接库
target_link_libraries(industrial_robot_control
    ${ETHERCAT_LIBRARIES}
    ${MODBUS_LIBRARIES}
    ${YAML_CPP_LIBRARIES}
    ${WEBSOCKETS_LIBRARIES}
    Eigen3::Eigen
    Threads::Threads
    rt
    fmt::fmt
)

# 安装目标
install(TARGETS industrial_robot_control DESTINATION bin)
